<template>
    <div>
        地图名字： {{ map.name }}
        <Inject />
    </div>
</template>

<script setup lang="ts">
    import { ref, reactive, provide, InjectionKey } from 'vue'
    import Inject from './Inject.vue'
    interface MapType {
        name: string
        version: number
        params: string
    }
    const map = reactive<MapType>({
        name: '高德',
        version: 1,
        params: '22',
    })

    provide('mapKey', map)
</script>
<style lang="scss" scoped></style>
